package org.pf.constructor.staff
{
	import flash.display.Sprite;
	import org.pf.base.pfStorages.PFStorageBodySprites;
	import org.pf.base.pfGraphics.staff.DrawBitmap;
	
	/**
	 * ...
	 * @author zeksa'
	 */
	public class PFBodyUserData
	{
		private var _bodyGeometry:PFBodyGeometry;
		private var _hasImage:Boolean;
		private var _bodyGraphics:PFBodyGraphics;
		private var _bodyName:String;
		
		private var _contactTranslocator:Array;
		
		private var _toRemove:Boolean;
		
		public function PFBodyUserData(bodyGeometry:PFBodyGeometry, sprites:PFStorageBodySprites)
		{
			_bodyGeometry = bodyGeometry;
			_bodyName = bodyGeometry.bodyName;
			_hasImage = bodyGeometry.hasImage;
			_contactTranslocator = new Array();
			_toRemove = false;
			
			if (_hasImage)
			{
				_bodyGraphics = new PFBodyGraphics();
				_bodyGraphics.setSprite(DrawBitmap.MakeImageForBody(bodyGeometry, sprites));
			}
		}
		
		public function get bodyGeometry():PFBodyGeometry
		{
			return _bodyGeometry;
		}
		
		public function set bodyGeometry(value:PFBodyGeometry):void
		{
			_bodyGeometry = value;
		}
		
		public function get bodyGraphics():PFBodyGraphics
		{
			return _bodyGraphics;
		}
		
		public function set bodyGraphics(value:PFBodyGraphics):void
		{
			_bodyGraphics = value;
		}
		
		public function get bodyName():String
		{
			return _bodyName;
		}
		
		public function get hasImage():Boolean
		{
			return _hasImage;
		}
		
		public function set hasImage(value:Boolean):void
		{
			_hasImage = value;
		}
		
		public function get contactTranslocator():Array
		{
			return _contactTranslocator;
		}
		
		public function set contactTranslocator(value:Array):void
		{
			_contactTranslocator = value;
		
		}
		
		public function get toRemove():Boolean 
		{
			return _toRemove;
		}
		
		public function set toRemove(value:Boolean):void 
		{
			_toRemove = value;
		}
	
	}

}